def reverse_integer(value: int) -> int:
    sign = -1 if value < 0 else 1
    value *= sign

    result = 0
    while value > 0:
        result *= 10
        result += value % 10
        value //= 10
    return result * sign


def _main():
    value = int(input("x="))
    print(f"nx={reverse_integer(value)}")


if __name__ == "__main__":
    _main()
